#! /bin/sh

# Variables for SF

#SF_LOG_IP=   # Log IP address if /dev/shm/run/logs/segfault.log exists (PRIVACY: DO NOT USE IN PRODUCTION)
# The sf-host will start a docker instance named "sf-guest${SF_GUEST_CONTAINER_NAME_SUFFIX}"
# e.g. sf-guest-v1.4
# This is helpful when upgrading sf-guest instance on a running system
# without having to take down the running sf-guest instances.
#SF_GUEST_CONTAINER_NAME_SUFFIX="-v${SF_VER}"

#Some limits are automatically adjusted during an attack.
#SF_USER_MEMORY_LIMIT=256m
#SF_USER_MEMORY_AND_SWAP_LIMIT=  # Not set=no swap. Example =4g
#SF_USER_PIDS_LIMIT=128
#SF_USER_CPU_SHARE=8             # 2..1024. docker's default is 1024. 2048 gives 2x and 512 half.
#SF_USER_OOM_SCORE=500
#SF_USER_NICE_SCORE=10           #-20 (most often scheduled) to 19 (least often scheduled)
#SF_ULIMIT_NOFILE="8192"         # Number of open files 16384:65536" _per_ container
#SF_USER_BLKIO_WEIGHT=100 # Reduced to 10 during DoS
#SF_MAX_STRAIN=100
#SF_SHM_SIZE=             # Hard limit is USER_MEMORY_LIMIT
#SF_CPUS=                 # automatic between 1..4 depending on host's cpu count
#SF_NEED_TOKEN=           # Block access without token. Setting '=msg.sh' will
                          # source config/etc/msg/token-needed-msg.sh before exiting.
			  # Tip: Used to allow only TOKEN access from countries or globally.
#SF_TOKEN_PREFIX=         # Will load token-${PREFIX}-${TOKEN}.conf instead.
#SF_TOKEN_IMMUTABLE=      # User can not change the token. Only valid in global & country.

#SF_USER_SYN_BURST=8196  # Can send 8k tcp sync packets
#SF_USER_SYN_LIMIT=1     # Thereafter refill with 1 syn/second, 0=unlimited
#SF_USER_UL_RATE=        # Limit LG egress speed (10Mbit, 20Mbit, ...)
#SF_SYN_BURST=10000      # Global limit. (0-10000)
#SF_SYN_LIMIT=200        # Global Limit. 0=unlimited

#SF_RPORT=1               # Enable reverse ports for users.
#SF_RPORT_ON_LOGIN=       # Auto-assign a reverse port on log in. Implies SF_RPORT=1.

## Per user limit of root filesystem /
#SF_USER_ROOT_FS_SIZE=        # e.g. 16MB, 2GB, 0=unlimited.    Not set=read-only
#SF_USER_ROOT_FS_INODE=65536  # Inode Limit. Only enforced if FS_SIZE > 0

# Per user limit of /sec, /onion and /everyone
# Either set both or none. default=unlimited
#SF_USER_FS_SIZE=   # =128m, xfs only,                Not set=unlimited
#SF_USER_FS_INODE=  # =16384, xfs only,               Not set=unlimited

#SF_USER_DEV_KVM=         # =1 to allow access to /dev/kvm (Warning: User can DoS PHY)
#SF_ALLOW_SRC_TOR=        # =1 to allow connections from TOR
#SF_USER_IMMUNE=          # =1 to not ban user by lgban

# Limit to 8 concurrently running servers per IP
#SF_LIMIT_SERVER_BY_IP=8

## Limit OUTGOING speed [1Mbit, 10Mbit, 100Mbit]. Leave empty for no limit [default].
# If you modify these values then you need to call this line to set
# the changes to a running system:
#     docker exec segfault_router_1 /tc.sh
SF_MAXOUT=10Mbit
#SF_MAXIN=10Mbit

